<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<header>
    <div id="logo">
        <img src="Content/css/images/logo.png" alt="">
    </div>
    <nav class="navbar navbar-default">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-menu">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
        </button>
            <a class="navbar-brand" href="IndexServlet">首页</a>
        </div>
        <div class="collapse navbar-collapse" id="navbar-collapse-menu">
        	
            <ul class="nav navbar-nav">
                <li class="active"><a href="PersonalDataServlet">个人主页</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">我的邮箱<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <li><a href="http://localhost:8080/MyCommunity/message/receive_list">收件箱</a></li>
                        <li><a href="http://localhost:8080/MyCommunity/message/send_list">发件箱</a></li>
                        <li class="divider"></li>
                        <li><a href="http://localhost:8080/MyCommunity/message/create">编写新邮件</a></li>
                    </ul>
                </li>
                <li>
                	
                	<a href="KeynoteServlet">发表主题</a>
                	
                </li>
            </ul>
            
            <form action="search_result" method="get" class="navbar-form navbar-left" role="search">
                <div class="form-group">
                    <input name="title" class="form-control" placeholder="主题" type="text">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
            <c:if test="${empty user}">
	            <li><a href="register.jsp">注册</a></li>
	            <li><a href="login.jsp?returnURL=${pageContext.request.requestURI }">登录</a></li>
            </c:if>
			<c:if test="${not empty user}">
				<li><a href="LogoutSerlvet?title=index">注销</a></li>
            	<li><a>您好，${user.nickname }</a></li>
			</c:if>
            </ul>
        </div>
    </nav>
</header>